
#ifndef _BAUDIOINPUT_H_
#define _BAUDIOINPUT_H_

#include <BObject>
#include <BAudioEvent>

namespace BWE
{
	class BWEAPI BAudioInput : public BObject
	{
		BOBJECT(BAudioInput)
	public:
		BAudioInput();
		~BAudioInput();

		bool open();
		bool close();

		bool start();
		bool pause();
		bool stop();

		bool recording() const;

		int deviceNumber() const;
		BString deviceName(int index) const;

		const BString& log() const;
		bool cleanLog();

	protected:
		virtual bool audioEvent(const BAudioEvent& audioEvent);

	};
	typedef BHolder<BAudioInput>		BAudioInputHolder;
}

#endif
